import React from 'react';
import { createBrowserRouter } from 'react-router-dom';
import Exception from '@/components/Exception';
import { BASE_ROUTE } from '../config';

// 系统路由配置
const systemRoutes = createBrowserRouter(
  [
    {
      path: '/',
      lazy: () => import('@/pages/index'),
    },
    {
      path: '/list-table',
      lazy: () => import('@/pages/list-table'),
    },
    {
      path: '*',
      element: <Exception type="404" title="404" description="Not Found" />,
    },
  ],
  { basename: BASE_ROUTE },
);

export default systemRoutes;
